#ifndef AVALON_WEBSERVICENODETESTER_HPP
#define AVALON_WEBSERVICENODETESTER_HPP
#include <cppunit/extensions/HelperMacros.h>
#include "Avalon/IOTests/MockClientChannel.hpp"
#include "Avalon/SignalHandling/SignalHandling.hpp"
#include "Avalon/WebServices/HttpServer.hpp"
#include "Avalon/WebServices/WebServiceNode.hpp"
#include "Avalon/WebServicesTests/WebServicesTests.hpp"

namespace Avalon {
namespace WebServices {
namespace Tests {

  /** \class WebServiceNodeTester
   *  \brief Tests the WebServiceNode class.
   *  \author Kamal Mansouri <kranar@hotmail.com>
   */
  class WebServiceNodeTester : public CPPUNIT_NS::TestFixture {
    public:

      virtual void setUp();

      virtual void tearDown();

      //! Tests a request with invalid syntax/serialization.
      void TestRequestSerializationError();

    private:
      IO::Tests::MockServerConnection* m_serverConnection;
      boost::scoped_ptr<HttpServer> m_server;
      boost::scoped_ptr<WebServiceNode> m_webServiceNode;
      SignalHandling::SignalSinkPtr m_sessionSink;
      boost::scoped_ptr<IO::Tests::MockClientChannel> m_channel;

      CPPUNIT_TEST_SUITE(WebServiceNodeTester);
        CPPUNIT_TEST(TestRequestSerializationError);
      CPPUNIT_TEST_SUITE_END();
  };
}
}
}

#endif // AVALON_WEBSERVICENODETESTER_HPP
